
define(["require",'config/appregister',"business/footer/services/httpServices","jquery"],function(require,app,httpServices){
    app.controller('callBackCtrl',function($scope,auth){
        $scope.isDetailPage = true;
        $scope.isMainpage = false;

		$scope.showSuccess = false;
		
		//提交反馈
		$scope.backSubmit = function(){
			auth.isLogin().then(function(){
				updateCollection();
			})
			var req = {
				type:'POST',
				uri:'addFeedBack',
				data:{
					content:$scope.backContent,
					nickName:$scope.backNickName,
					eMail:$scope.backEmail,
					qq:$scope.backQQ,
				}
			};
			httpServices.callBackHttpService(req).success(function(response){
                $scope.$apply(function(){
					if(response.code == 0){
						$scope.showSuccess = true;
					}
                })
			}).error(function(response){
				console.log(response)
			})
		}
		//取消
		$scope.backResize = function(){
			$scope.backContent = "";
			$scope.backNickName = "";
			$scope.backQQ = "";
			$scope.backEmail = "";
			
		}
		$scope.subSuccess = function(){
			$scope.showSuccess = false;
		}
    })
});

